﻿using Microsoft.AspNetCore.Mvc;
using ZingBlog.IService;

namespace ZingBlog.Web.Controllers
{
    public class DiarysController : Controller
    {
        public IDiarysService service { get; set; }
        // GET: Diarys
        public ActionResult Index()
        {
            ViewData["Year"] = service.GetYear();
            string _orderby = "ORDER BY CreateOn DESC";
            ViewData["DiarysList"] = service.GetAll(null, _orderby);
            return View();
        }
    }
}